using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._GeodatabaseAdministration
{
    /// <summary>
    /// <para>Register with Geodatabase</para>
    /// <para>Registers with the geodatabase the feature classes, tables, views, and raster layers that were created in the database using third-party tools or views created with the  Create Database View  tool. Once registered, information about the items—such as table and column names, spatial extent, and geometry type—is stored in the geodatabase's system tables, allowing these registered items to participate in geodatabase functionality.</para>
    /// <para>将使用第三方工具或使用创建数据库视图工具创建的视图在数据库中创建的要素类、表、视图和栅格图层注册到地理数据库。注册后，有关项目的信息（例如表和列名称、空间范围和几何类型）将存储在地理数据库的系统表中，从而允许这些注册项目参与地理数据库功能。</para>
    /// </summary>    
    [DisplayName("Register with Geodatabase")]
    public class RegisterWithGeodatabase : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RegisterWithGeodatabase()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Datasets</para>
        /// <para>The feature class, table, view, or raster created using third-party tools or SQL, or the view created using the Create Database View tool that will be registered with the geodatabase. The dataset must exist in the same database as the geodatabase.</para>
        /// <para>使用第三方工具或 SQL 创建的要素类、表、视图或栅格，或使用将注册到地理数据库的创建数据库视图工具创建的视图。数据集必须与地理数据库位于同一数据库中。</para>
        /// </param>
        public RegisterWithGeodatabase(object _in_dataset)
        {
            this._in_dataset = _in_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Register with Geodatabase";

        public override string CallName => "management.RegisterWithGeodatabase";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _reg_dataset, _in_object_id_field, _in_shape_field, _in_geometry_type.GetGPValue(), _in_spatial_reference, _in_extent];

        /// <summary>
        /// <para>Input Datasets</para>
        /// <para>The feature class, table, view, or raster created using third-party tools or SQL, or the view created using the Create Database View tool that will be registered with the geodatabase. The dataset must exist in the same database as the geodatabase.</para>
        /// <para>使用第三方工具或 SQL 创建的要素类、表、视图或栅格，或使用将注册到地理数据库的创建数据库视图工具创建的视图。数据集必须与地理数据库位于同一数据库中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Datasets")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Registered Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Registered Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _reg_dataset { get; set; }


        /// <summary>
        /// <para>Object ID Field</para>
        /// <para>The field that will be used as the ObjectID field. This input is required when registering a view, and you must supply an existing integer field. This parameter is optional when registering other dataset types; if you use an existing field, it must be an integer data type. If an existing field is not supplied when registering these other dataset types, an ObjectID field will be created and populated.</para>
        /// <para>将用作 ObjectID 字段的字段。注册视图时需要此输入，并且必须提供现有的整数字段。注册其他数据集类型时，此参数是可选的;如果使用现有字段，则该字段必须是整数数据类型。如果在注册这些其他数据集类型时未提供现有字段，则将创建并填充 ObjectID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Object ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_object_id_field { get; set; } = null;


        /// <summary>
        /// <para>Shape Field</para>
        /// <para>If the input dataset contains a spatial data type column, include this field during the registration process.</para>
        /// <para>如果输入数据集包含空间数据类型列，请在注册过程中包含此字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Shape Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_shape_field { get; set; } = null;


        /// <summary>
        /// <para>Geometry Type</para>
        /// <para>Specifies the geometry type. If the Shape Field parameter value is present, you must specify a geometry type. Supported geometry types are point, multipoint, polygon, and polyline. If the dataset being registered contains existing features, the geometry type specified must match the entity type of these features.</para>
        /// <para>指定几何类型。如果存在“形状字段”参数值，则必须指定几何类型。支持的几何类型包括点、多点、多边形和折线。如果要注册的数据集包含现有要素，则指定的几何类型必须与这些要素的实体类型匹配。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geometry Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _in_geometry_type_value? _in_geometry_type { get; set; } = null;

        public enum _in_geometry_type_value
        {
            /// <summary>
            /// <para>Point</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Point")]
            [GPEnumValue("POINT")]
            _POINT,

            /// <summary>
            /// <para>Multipoint</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Multipoint")]
            [GPEnumValue("MULTIPOINT")]
            _MULTIPOINT,

            /// <summary>
            /// <para>Polygon</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Polygon")]
            [GPEnumValue("POLYGON")]
            _POLYGON,

            /// <summary>
            /// <para>Polyline</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Polyline")]
            [GPEnumValue("POLYLINE")]
            _POLYLINE,

        }

        /// <summary>
        /// <para>Coordinate System</para>
        /// <para>If the Shape Field parameter value is present and the table is empty, specify the coordinate system to be used for features. If the dataset being registered contains existing features, the coordinate system specified must match the coordinate system of the existing features.</para>
        /// <para>如果存在形状字段参数值且表为空，则指定要用于要素的坐标系。如果正在注册的数据集包含现有要素，则指定的坐标系必须与现有要素的坐标系匹配。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Extent</para>
        /// <para>If the Shape Field parameter value is present, specify the allowable coordinate range for x,y coordinates. If the dataset being registered contains existing features, the extent of the existing features will be used.</para>
        /// <para>如果存在“形状字段”参数值，请指定 x，y 坐标的允许坐标范围。如果正在注册的数据集包含现有要素，则将使用现有要素的范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_extent { get; set; } = null;


        public RegisterWithGeodatabase SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}